\(\int \frac {(a+b x^2) \cosh (c+d x)}{x} \, dx\) [44]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 17, antiderivative size = 41 \[ \int \frac {\left (a+b x^2\right ) \cosh (c+d x)}{x} \, dx=-\frac {b \cosh (c+d x)}{d^2}+a \cosh (c) \text {Chi}(d x)+\frac {b x \sinh (c+d x)}{d}+a \sinh (c) \text {Shi}(d x) \]

[Out]

a*Chi(d*x)*cosh(c)-b*cosh(d*x+c)/d^2+a*Shi(d*x)*sinh(c)+b*x*sinh(d*x+c)/d

Rubi [A] (verified)

Time = 0.08 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.353, Rules used = {5395, 3384, 3379, 3382, 3377, 2718} \[ \int \frac {\left (a+b x^2\right ) \cosh (c+d x)}{x} \, dx=a \cosh (c) \text {Chi}(d x)+a \sinh (c) \text {Shi}(d x)-\frac {b \cosh (c+d x)}{d^2}+\frac {b x \sinh (c+d x)}{d} \]

[In]

Int[((a + b*x^2)*Cosh[c + d*x])/x,x]

[Out]

-((b*Cosh[c + d*x])/d^2) + a*Cosh[c]*CoshIntegral[d*x] + (b*x*Sinh[c + d*x])/d + a*Sinh[c]*SinhIntegral[d*x]

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3379

Int[sin[(e_.) + (Complex[0, fz_])*(f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[I*(SinhIntegral[c*f*(fz/
d) + f*fz*x]/d), x] /; FreeQ[{c, d, e, f, fz}, x] && EqQ[d*e - c*f*fz*I, 0]

Rule 3382

Int[sin[(e_.) + (Complex[0, fz_])*(f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CoshIntegral[c*f*(fz/d)
+ f*fz*x]/d, x] /; FreeQ[{c, d, e, f, fz}, x] && EqQ[d*(e - Pi/2) - c*f*fz*I, 0]

Rule 3384

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[c*(f/d) + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[c*(f/d) + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 5395

Int[Cosh[(c_.) + (d_.)*(x_)]*((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[Cosh[c + d*x], (e*x)^m*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {a \cosh (c+d x)}{x}+b x \cosh (c+d x)\right ) \, dx \\ & = a \int \frac {\cosh (c+d x)}{x} \, dx+b \int x \cosh (c+d x) \, dx \\ & = \frac {b x \sinh (c+d x)}{d}-\frac {b \int \sinh (c+d x) \, dx}{d}+(a \cosh (c)) \int \frac {\cosh (d x)}{x} \, dx+(a \sinh (c)) \int \frac {\sinh (d x)}{x} \, dx \\ & = -\frac {b \cosh (c+d x)}{d^2}+a \cosh (c) \text {Chi}(d x)+\frac {b x \sinh (c+d x)}{d}+a \sinh (c) \text {Shi}(d x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.34 \[ \int \frac {\left (a+b x^2\right ) \cosh (c+d x)}{x} \, dx=a \cosh (c) \text {Chi}(d x)+\frac {b \cosh (d x) (-\cosh (c)+d x \sinh (c))}{d^2}+\frac {b (d x \cosh (c)-\sinh (c)) \sinh (d x)}{d^2}+a \sinh (c) \text {Shi}(d x) \]

[In]

Integrate[((a + b*x^2)*Cosh[c + d*x])/x,x]

[Out]

a*Cosh[c]*CoshIntegral[d*x] + (b*Cosh[d*x]*(-Cosh[c] + d*x*Sinh[c]))/d^2 + (b*(d*x*Cosh[c] - Sinh[c])*Sinh[d*x
])/d^2 + a*Sinh[c]*SinhIntegral[d*x]

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.98

method result size
risch \(-\frac {a \,{\mathrm e}^{-c} \operatorname {Ei}_{1}\left (d x \right )}{2}-\frac {a \,{\mathrm e}^{c} \operatorname {Ei}_{1}\left (-d x \right )}{2}-\frac {{\mathrm e}^{-d x -c} b x}{2 d}+\frac {{\mathrm e}^{d x +c} b x}{2 d}-\frac {{\mathrm e}^{-d x -c} b}{2 d^{2}}-\frac {{\mathrm e}^{d x +c} b}{2 d^{2}}\) \(81\)
meijerg \(-\frac {2 b \cosh \left (c \right ) \sqrt {\pi }\, \left (-\frac {1}{2 \sqrt {\pi }}+\frac {\cosh \left (d x \right )}{2 \sqrt {\pi }}-\frac {d x \sinh \left (d x \right )}{2 \sqrt {\pi }}\right )}{d^{2}}+\frac {b \sinh \left (c \right ) \left (\cosh \left (d x \right ) x d -\sinh \left (d x \right )\right )}{d^{2}}+\frac {a \cosh \left (c \right ) \sqrt {\pi }\, \left (\frac {2 \gamma +2 \ln \left (x \right )+2 \ln \left (i d \right )}{\sqrt {\pi }}+\frac {2 \,\operatorname {Chi}\left (d x \right )-2 \ln \left (d x \right )-2 \gamma }{\sqrt {\pi }}\right )}{2}+a \,\operatorname {Shi}\left (d x \right ) \sinh \left (c \right )\) \(115\)

[In]

int((b*x^2+a)*cosh(d*x+c)/x,x,method=_RETURNVERBOSE)

[Out]

-1/2*a*exp(-c)*Ei(1,d*x)-1/2*a*exp(c)*Ei(1,-d*x)-1/2/d*exp(-d*x-c)*b*x+1/2/d*exp(d*x+c)*b*x-1/2/d^2*exp(-d*x-c
)*b-1/2/d^2*exp(d*x+c)*b

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.78 \[ \int \frac {\left (a+b x^2\right ) \cosh (c+d x)}{x} \, dx=\frac {2 \, b d x \sinh \left (d x + c\right ) - 2 \, b \cosh \left (d x + c\right ) + {\left (a d^{2} {\rm Ei}\left (d x\right ) + a d^{2} {\rm Ei}\left (-d x\right )\right )} \cosh \left (c\right ) + {\left (a d^{2} {\rm Ei}\left (d x\right ) - a d^{2} {\rm Ei}\left (-d x\right )\right )} \sinh \left (c\right )}{2 \, d^{2}} \]

[In]

integrate((b*x^2+a)*cosh(d*x+c)/x,x, algorithm="fricas")

[Out]

1/2*(2*b*d*x*sinh(d*x + c) - 2*b*cosh(d*x + c) + (a*d^2*Ei(d*x) + a*d^2*Ei(-d*x))*cosh(c) + (a*d^2*Ei(d*x) - a
*d^2*Ei(-d*x))*sinh(c))/d^2

Sympy [A] (verification not implemented)

Time = 1.65 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.20 \[ \int \frac {\left (a+b x^2\right ) \cosh (c+d x)}{x} \, dx=a \sinh {\left (c \right )} \operatorname {Shi}{\left (d x \right )} + a \cosh {\left (c \right )} \operatorname {Chi}\left (d x\right ) + b \left (\begin {cases} \frac {x \sinh {\left (c + d x \right )}}{d} - \frac {\cosh {\left (c + d x \right )}}{d^{2}} & \text {for}\: d \neq 0 \\\frac {x^{2} \cosh {\left (c \right )}}{2} & \text {otherwise} \end {cases}\right ) \]

[In]

integrate((b*x**2+a)*cosh(d*x+c)/x,x)

[Out]

a*sinh(c)*Shi(d*x) + a*cosh(c)*Chi(d*x) + b*Piecewise((x*sinh(c + d*x)/d - cosh(c + d*x)/d**2, Ne(d, 0)), (x**
2*cosh(c)/2, True))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 122 vs. \(2 (41) = 82\).

Time = 0.23 (sec) , antiderivative size = 122, normalized size of antiderivative = 2.98 \[ \int \frac {\left (a+b x^2\right ) \cosh (c+d x)}{x} \, dx=-\frac {1}{4} \, {\left (b {\left (\frac {{\left (d^{2} x^{2} e^{c} - 2 \, d x e^{c} + 2 \, e^{c}\right )} e^{\left (d x\right )}}{d^{3}} + \frac {{\left (d^{2} x^{2} + 2 \, d x + 2\right )} e^{\left (-d x - c\right )}}{d^{3}}\right )} + \frac {2 \, a \cosh \left (d x + c\right ) \log \left (x^{2}\right )}{d} - \frac {2 \, {\left ({\rm Ei}\left (-d x\right ) e^{\left (-c\right )} + {\rm Ei}\left (d x\right ) e^{c}\right )} a}{d}\right )} d + \frac {1}{2} \, {\left (b x^{2} + a \log \left (x^{2}\right )\right )} \cosh \left (d x + c\right ) \]

[In]

integrate((b*x^2+a)*cosh(d*x+c)/x,x, algorithm="maxima")

[Out]

-1/4*(b*((d^2*x^2*e^c - 2*d*x*e^c + 2*e^c)*e^(d*x)/d^3 + (d^2*x^2 + 2*d*x + 2)*e^(-d*x - c)/d^3) + 2*a*cosh(d*
x + c)*log(x^2)/d - 2*(Ei(-d*x)*e^(-c) + Ei(d*x)*e^c)*a/d)*d + 1/2*(b*x^2 + a*log(x^2))*cosh(d*x + c)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.85 \[ \int \frac {\left (a+b x^2\right ) \cosh (c+d x)}{x} \, dx=\frac {a d^{2} {\rm Ei}\left (-d x\right ) e^{\left (-c\right )} + a d^{2} {\rm Ei}\left (d x\right ) e^{c} + b d x e^{\left (d x + c\right )} - b d x e^{\left (-d x - c\right )} - b e^{\left (d x + c\right )} - b e^{\left (-d x - c\right )}}{2 \, d^{2}} \]

[In]

integrate((b*x^2+a)*cosh(d*x+c)/x,x, algorithm="giac")

[Out]

1/2*(a*d^2*Ei(-d*x)*e^(-c) + a*d^2*Ei(d*x)*e^c + b*d*x*e^(d*x + c) - b*d*x*e^(-d*x - c) - b*e^(d*x + c) - b*e^
(-d*x - c))/d^2

Mupad [F(-1)]

Timed out. \[ \int \frac {\left (a+b x^2\right ) \cosh (c+d x)}{x} \, dx=a\,\mathrm {coshint}\left (d\,x\right )\,\mathrm {cosh}\left (c\right )+a\,\mathrm {sinhint}\left (d\,x\right )\,\mathrm {sinh}\left (c\right )-\frac {b\,\left (\mathrm {cosh}\left (c+d\,x\right )-d\,x\,\mathrm {sinh}\left (c+d\,x\right )\right )}{d^2} \]

[In]

int((cosh(c + d*x)*(a + b*x^2))/x,x)

[Out]

a*coshint(d*x)*cosh(c) + a*sinhint(d*x)*sinh(c) - (b*(cosh(c + d*x) - d*x*sinh(c + d*x)))/d^2